/*
 * @Author: luojianfeng
 * @Date: 2025-10-15 16:35:15
 * @LastEditTime: 2025-10-15 16:35:20
 * @LastEditors: luojianfeng
 * @Description:
 */
import { getCodeRanges } from './astRange.js'

/** 返回非注释区域的拼接字符串 */
export function extractCode(code: string): string {
  return getCodeRanges(code)
    .map((r) => code.slice(r.start, r.end))
    .join('')
}
